//
//  MyCollectionViewCell.m
//  豆瓣
//
//  Created by dllo on 15/12/26.
//  Copyright © 2015年 HaiTeng. All rights reserved.
//

#import "MyCollectionViewCell.h"

@implementation MyCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self addAllViews];
    }
    
    return self;
}


- (void)addAllViews{
    
    self.imv = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height * .8)];
    [self addSubview:self.imv];
    
    self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, self.imv.frame.size.height, self.contentView.frame.size.width, self.contentView.frame.size.height * .2)];
    self.label.textAlignment = NSTextAlignmentCenter;
    self.label.lineBreakMode = NSLineBreakByTruncatingMiddle;
    [self.contentView addSubview:self.label];
    
    
    
}


@end
